<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
	<head>
		<meta charset="UTF-8">
		<title>爱购注册页面</title>
		<%
			String basePath = request.getScheme()+"://"+request.getServerName()+":"+
					request.getServerPort()+request.getContextPath()+"/";
		%>
		<base href="<%=basePath%>">
		<link rel="icon" type="image/x-icon" href="img/title-icon.jpg"/>
		<link rel="stylesheet" href="css/reset.css" />
		<link rel="stylesheet" href="css/footer.css" />
		<link rel="stylesheet" href="css/login.css" />
		<style>
			.reg-div input{
				width: 305px;
				padding-left: 10px;
			}
			.pro{
				margin-top: 10px;
			}
			.pro a{
				color: #B41E23;
			}
		</style>
	</head>
	<body>
		<!--登录/注册的头部-->
		<div class="lr-top w1230">
			<a href="index.html"><img src="img/logo.png" width="150px" height="60px"/></a>
			<div class="top-link">
				<a href="#"class="top-link1"></a>
				<a href="#" class="top-link2"></a>
				<a href="#" class="top-link3"></a>
			</div>
		</div>
		<!--登录/注册的中部-->
		<div class="lr-main">
			<div class="w1230">
				<div class="reg-div">
					<h3 class="login-title">注册爱购</h3>
					<p class="go-reg">若有账号？<a href="login.html">在此登录</a></p>
					<form action="/reg/register" method="post">
						<span><font color="red"><%=request.getAttribute("msg")==null?"":request.getAttribute("msg")%></font></span>
						<span><font color="#7cfc00"><%=request.getAttribute("msg1")==null?"":request.getAttribute("msg1")%></font></span>
						<p><input type="text" placeholder="请输入注册的账号" name="username" onblur="checkName(this.value)"/></p>
						<span id="sp"></span>
						<p><input type="password" placeholder="请输入密码" name="psw1"/></p>
						<p><input type="password" placeholder="请确认密码" name="psw2"/></p>
						<p class="clear-float"><input type="text" placeholder="验证码" class="code" name="code"/><img src="/reg/register" width="110px" height="42px" class="code-img"/></p>
						<input type="submit" value="同意并注册协议" class="sum-btn" />
						<p class="pro"><a href="#">《爱购用户协议》</a></p>
					</form>
				</div>
			</div>	
		</div>
		<!--登录/注册的底部-->
		<div class="lr-footer footer">
			<p class="w1230">
				<a href="#">关于爱购</a>
				<a href="#">合作伙伴</a>
				<a href="#">营销中心</a>
				<a href="#">廉正举报</a>
				<a href="#">联系客服</a>
				<a href="#">开发平台</a>
				<a href="#">诚征英才</a>
				<a href="#">联系我们</a>
				<a href="#">网站地图</a>
				<a href="#">知识产权</a><span>|</span>
				<span>&copy;2018-2020 igo.com 版权所有</span>
			</p>
		</div>
	</body>
	<script src="js/jquery.js"></script>
	<script>
		function checkName(v) {
			$.post('/reg/register.do',{username:v},function (data) {
				$('#sp').text(data.msg).css("color",data.color)
			},"json")
		}
	</script>
</html>
